package common.log;


public class LoggerProxy {
	private org.apache.log4j.Logger log = null;

	public LoggerProxy(org.apache.log4j.Logger log) {
		super();
		this.log = log;
	}

	public static LoggerProxy getLogger(String name) {
		return new LoggerProxy(org.apache.log4j.Logger.getLogger(name));
	}

	public static LoggerProxy getLogger(Class<?> clazz) {
		return new LoggerProxy(org.apache.log4j.Logger.getLogger(clazz.getName()));
	}

	public static LoggerProxy getRootLogger() {
		return new LoggerProxy(org.apache.log4j.Logger.getRootLogger());
	}

	public void info(Object message) {
		log.info(message);
	}

	public void info(Object message, Throwable t) {
		log.info(message, t);
	}

	public void debug(Object message) {
		log.debug(message);
	}

	public void debug(Object message, Throwable t) {
		log.debug(message, t);
	}

	public void error(Object message) {
		log.error(message);
	}

	public void error(Object message, Throwable t) {
		log.error(message, t);

	}
}
